package com.swsc.xapp.xroom;

import androidx.room.Dao;
import androidx.room.Query;

import java.util.List;

@Dao
public interface InfraredImageDao extends BaseDao<InfraredImageDO>{
    @Query("DELETE FROM SOLAR_INFRARED_IMAGE WHERE tenant_no = :tenantNo AND organ_no =:organNo")
    void deleteByTenantOrgan(Integer tenantNo, Integer organNo);

    @Query("SELECT * FROM SOLAR_INFRARED_IMAGE WHERE DEFECT_NO = :defectNo")
    List<InfraredImageDO> listByDefectNo(Long defectNo);

    @Override
    default String getTableName() {
        return "solar_infrared_image";
    }
}
